package service;

import pojo.User;
import pojo.vo.UserVo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-12-06
 * Time: 11:13
 */
public interface UserService {
    /**
     * 用户登录
     */
    public User login(String account, String password);

    /**
     * 根据账号获取用户对象
     */
    public User getUserByAccount(String account);


    /**
     * 根据用户姓名获取用户对象
     */
    public User getUserByName(String name);

    /**
     * 修改用户信息
     */
    public boolean modifyUser(User user);

    /**
     * 注册
     * @param account
     * @param password
     * @param nick_name
     * @param category_id
     * @return
     */
    public boolean register(String account,String password,String nick_name,long category_id);

    /**
     * 查找用户
     * @param account
     * @return
     */
    public User Search(String account);

    /**
     * 添加用户
     * @param account
     * @param password
     * @param nick_name
     * @param category_id
     * @param already_number
     * @return
     */
    public boolean addUser(String account,String password,String nick_name,Long category_id,Long already_number);

    /**
     * 删除用户
     * @param account
     * @return
     */
    public boolean deleteUser1(String account);

    /**
     * 查询所有用户
     * @return
     */
    public List<UserVo> listUser();

    /**
     * 修改用户
     * @param newuser
     * @return
     */
    public boolean updateUser(User newuser);

    /**
     * 根据账号查询用户
     * @param account
     * @return
     */
    public List<User> listuserByAccount(String account);
}
